package com.imooc.utils;

import org.apache.commons.lang3.StringUtils;

/**
 * @Author : Kyle_Fu
 * @Date: 2023-05-23 20:14
 */
public class NameUtil {

    /**
     * 验证name是否符合要求
     * @param name
     * @return
     */
    public static boolean verifyName(String name){

        System.out.println(name.length());
        // name验证规则 不能为空,长度为6~12之间
        if (StringUtils.isBlank(name) || (name.length() < 6 || name.length() > 12)){
            return false;
        }
        return true;

    }

    public static void main(String[] args) {
        boolean res =
                verifyName("张三11111111111");
        System.out.println(res);
    }

}
